<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ 后台主题UI框架 - 空白页</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico"> <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
     <!-- jqgrid-->
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
  <script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/sc/js/page.js"></script>
    <style>
       .checkbox-inline input[type=checkbox],.radio-inline input[type=radio] {
           margin-top: 4px;
      }
    </style>
</head>

<body style="color:#333;padding:3px;" class="x_sorll">
    <!-- 标题 -->
    <div class="page-heade">
      <h2 class="title_color text-center">总账对账明细</h2>
    </div>
    <!-- 标题 -->
    <div>
    <form action="#" method="post" class="form-inline formpage" id="form_check">
               <input type="hidden" value='{$page}' name="page" id="page-go"/>
                      <input type="hidden" value='{$list}' name="list" id="list-go"/>
                     
      <table class="row-margin-top tab-content table-bordered table text-left" border="1">
          <tr>
            <td style="min-width: 120px" class="text-right"><label for="" class="form-label">本次明细编号：</label></td>
            <td><input type="text" class="form-control" name="bencino" value="{$data.bencino}"></td>
             <td style="min-width: 160px" class="text-right"><label for="" class="form-label">对应市场费用申请编码：</label></td>
            <td><input type="text" class="form-control" name="duiyingno" value="{$data.duiyingno}"></td>
               <td style="min-width: 120px" class="text-right"><label for="" class="form-label">  计入日期：</label>
               </td>
                <td>
               <div class="form-group">
               <input type="text" id="start" name="start" value="{$data.start}" class="form-control layer-date " style="min-width: 100px;width: 100px; height: 26px;display: inline-block;">
              </div>
               <div class="form-group">
                 -
               </div>
              <div class="form-group">
                <input type="text" class="form-control layer-date" style="min-width: 100px;width: 100px; height: 26px;display: inline-block;" id="end" name="end" value="{$data.end}">
               </div>
                </td>
              <td style="min-width: 120px" class="text-right"><label for="" class="form-label">费用类型：</label></td>
            <td>
              <select name="type" id="" class="form-control">
                 <option value="0">请选择</option>
                  <option value="1" {if $data.type==1} selected {/if}>AP</option>
                  <option value="2" {if $data.type==2} selected {/if}>TI</option>
              </select>
            </td>
             </tr>
            <tr>
              <td colspan="8">
                  类型：
                   <div class="form-group">

                   {volist name="caozuo" id="vo"}
                       <label class="checkbox-inline">
                         <input type="checkbox" name="caozuo[]" {if $vo.check==1}checked{/if} value="{$vo.id}">{$vo.title}
                      </label>
                   {/volist}
                
              </div>
              </td>
            </tr>
          <tr>
             <td colspan="8" class="text-center">
               <button class="btn btn-info query" type="button" id="check">查询</button>
              <button class="btn btn-info emptyIf" type="button" id="clear_check">清空查询条件</button>
              <button class="btn btn-info LendExcel" type="button">导出Excel</button>
            </td>
          </tr>
      </table>
      <table class="table table-striped row-margin-top table-bordered table-hover text-center bud_hei">
          <tr class="info">
            <th class="text-center">序号</th>
            <th class="text-center">申请人</th>
            <th class="text-center">本次明细编号</th>
            <th class="text-center">对应市场费用申请编号</th>
            <th class="text-center">计入日期</th>
            <th class="text-center">费用类型</th>
            <th class="text-center">类型</th>
            <th class="text-center">金额(元)</th>
            <th class="text-center">增值税(元)</th>
          </tr>
          {volist name="apply" id="vo"}
           <tr>
            <td>{$i}</td>
            <td>{$vo.em_name}</td>
            <td>{$vo.bencino}</td>
            <td>{$vo.duiyingno}</td>
            <td>{$vo.jiruday}</td>

            <td>{if $vo.type==1}AP{else/}TI{/if}</td>
            <td>{$vo.title}</td>
            <td class="text-right ObjectNum num2 jisuan1">{$vo.jine}</td>
            <td class="text-right ObjectNum num2 jisuan2">{$vo.zengzhishui}</td>
          </tr>
          {/volist}
        
          <tr class="trTotal text-right">
            <td colspan="7">当前页合计</td>
            <td class="ObjectNum num2 zonghe1">1431</td>
            <td class="ObjectNum num2 zonghe2">0</td>
          </tr>
      </table>
         <h5 class="text-center" id="pagesc" style="font-size: 16px;font-weight: 500">
            <script>
                            $(function(){
                                pageSC("pagesc",{$sum},{$page},{$maxpage})
                            })
                        </script>

                         每页显示
           <select id="pagesize">
                        <option value='10' {if condition="$list eq 10"}selected{/if}>10条</option>
                        <option value='15'{if condition="$list eq 15"}selected{/if}>15条</option>
                        <option value='20'{if condition="$list eq 20"}selected{/if}>20条</option>

            </select>
        </h5>

</form>
    </div>
    <!-- 全局js -->
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <!--统计代码，可删除-->
    <script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
      <script src="__STATIC__/layout/js/common.js"></script>
    <script>
        //日期范围限制
        var start = {
            elem: '#start',
            format: 'YYYY-MM-DD',
           
            max: '2099-06-16 23:59:59', //最大日期
            istime: true,
            istoday: false,
            choose: function (datas) {
                end.min = datas; //开始日选好后，重置结束日的最小日期
                end.start = datas //将结束日的初始值设定为开始日
            }
        };
        var end = {
            elem: '#end',
            format: 'YYYY-MM-DD',
          
            max: '2099-06-16 23:59:59',
            istime: true,
            istoday: false,
            choose: function (datas) {
                start.max = datas; //结束日选好后，重置开始日的最大日期
            }
        };
        laydate(start);
        laydate(end);
          $(document).ready(function(){
             $(".num2").each(function(){
                  if($(this).html()!=""){
                     $(this).html(parseFloat($(this).html()).toFixed(2));
                   }else{
                     $(this).html("0.00");
                   }
                 
               })
            for(var i=1;i<=2;i++){
              var he=0;
                $(".jisuan"+i).each(function(){
                  he+=parseFloat($(this).html());
                })
                $(".zonghe"+i).html(he.toFixed(2));

            }
            var $ObjectNum =$(".ObjectNum");
               toNum($ObjectNum);
          })



                             //翻页
      
        $("#check").click(function(){
              $("#page-go").val(1);
              $(".formpage").submit();
        })
        $("#clear_check").click(function(){
            $("input[type='text']").val("");
            $("select").val(0);
            $("#page-go").val(1);
            $("input[type='checkbox']").prop("checked",false);
            $(".formpage").submit();
        })
          $(".LendExcel").click(function(){
      window.open('{:url("daochuzong")}?datastr={$datastr}');
    })
    </script>
</body>

</html>
